-- GENERATED SPELL FOR [Torek] --


function spell0_12858(pUnit, Event) --@Rend,n/a--
pUnit:FullCastSpellOnTarget(11977,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12858', 15000, 1)
end

function spell1_12858(pUnit, Event) --@Thunderclap,Self--
pUnit:FullCastSpellOnTarget(8078,pUnit)
pUnit:RegisterEvent('Sorts_12858', 10348, 1)
end

function Sorts_12858(pUnit, Event)
local choix_sorts_12858 = math.random(0, 1)
if choix_sorts_12858 == 0 then
pUnit:RegisterEvent('spell0_12858', 1, 1)
end
if choix_sorts_12858 == 1 then
pUnit:RegisterEvent('spell1_12858', 1, 1)
end
end

function mob12858_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12858', math.random(1500, 3000), 1)
end

function mob12858_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12858_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12858_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12858, 1, 'mob12858_Action')
RegisterUnitEvent(12858, 2, 'mob12858_Leave')
RegisterUnitEvent(12858, 3, 'mob12858_Kill')
RegisterUnitEvent(12858, 4, 'mob12858_Die')
